package p2pcdnsim.network;


public class Socket {

	private TCPConnection conn;
	private ApplicationProcess appProcess;
	
	boolean isBlockedOpen = false;
	
	public Socket(ApplicationProcess applicationProcess, TCPConnection conn) {
		this.conn = conn;
		conn.setSocket(this);
		this.appProcess = applicationProcess;
	}
	
	public void open(int timeout) {
		isBlockedOpen = true;
		conn.open(timeout);
		appProcess.passivate();

	}

	public ApplicationMessage receiveMessage() {
		// TODO Auto-generated method stub
		return null;
	}

	public void sendMessage(ApplicationMessage content) {
		// TODO Auto-generated method stub
		
	}

	public void close() {
		// TODO Auto-generated method stub
		
	}


}
